package com.gs.gaosheng.service.impl;

import com.gs.gaosheng.domain.GsOrder;
import com.gs.gaosheng.mapper.GsOrderMapper;
import com.gs.gaosheng.service.GsOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 订单Service业务层处理
 *
 * @author yy
 * @date 2023-08-03
 */
@Service
public class GsOrderServiceImpl implements GsOrderService
{
    @Autowired
    private GsOrderMapper gsOrderMapper;

    /**
     * 查询订单
     *
     * @param orderId 订单ID
     * @return 订单
     */
    @Override
    public GsOrder selectGsOrderById(Long orderId)
    {
        return gsOrderMapper.selectGsOrderById(orderId);
    }

    /**
     * 查询订单列表
     *
     * @param gsOrder 订单
     * @return 订单
     */
    @Override
    public List<GsOrder> selectGsOrderList(GsOrder gsOrder)
    {
        return gsOrderMapper.selectGsOrderList(gsOrder);
    }

    /**
     * 新增订单
     *
     * @param gsOrder 订单
     * @return 结果
     */
    @Override
    public int insertGsOrder(GsOrder gsOrder)
    {
        return gsOrderMapper.insertGsOrder(gsOrder);
    }

    /**
     * 修改订单
     *
     * @param gsOrder 订单
     * @return 结果
     */
    @Override
    public int updateGsOrder(GsOrder gsOrder)
    {
        return gsOrderMapper.updateGsOrder(gsOrder);
    }

    /**
     * 批量删除订单
     *
     * @param orderIds 需要删除的订单ID
     * @return 结果
     */
    @Override
    public int deleteGsOrderByIds(Long[] orderIds)
    {
        return gsOrderMapper.deleteGsOrderByIds(orderIds);
    }

    /**
     * 删除订单信息
     *
     * @param orderId 订单ID
     * @return 结果
     */
    @Override
    public int deleteGsOrderById(Long orderId)
    {
        return gsOrderMapper.deleteGsOrderById(orderId);
    }
}
